package com.jiangcheng.demo.utils;

import lombok.Data;
import org.springframework.stereotype.Component;

@Data
public class Result {
    private int state;
    private Boolean success;
    private String msg;
    private Object data;
    private String token;

    public Result(int state, Boolean success, String msg) {
        this.state = state;
        this.success = success;
        this.msg = msg;
    }

    public Result(int state, Boolean success, String msg,Object data) {
        this.state = state;
        this.success = success;
        this.msg = msg;
        this.data = data;
    }

    public Result(int state, Boolean success, String msg,  String token) {
        this.state = state;
        this.success = success;
        this.msg = msg;
        this.token = token;
    }


    public Result(int state, Boolean success, String msg, Object data, String token) {
        this.state = state;
        this.success = success;
        this.msg = msg;
        this.data = data;
        this.token = token;
    }
}

